package demo.spring.test180318Resources;

import demo.spring.UnitTestBase;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit4ClassRunner;

import java.io.IOException;

/**
 * @Author: tyzhang
 * @Description:
 * @Date: Created in 13:58 2018/3/18
 */
@RunWith(BlockJUnit4ClassRunner.class)
public class TestResource extends UnitTestBase {
    public TestResource() {
        super("classpath:spring-resource.xml");
    }

    @Test
    public void testResource(){
        MoocResource moocResource = super.getBean("moocResource");
        System.out.println(moocResource);
        try {
            moocResource.resource();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
